import request from '@/utils/request'

// 查询用户资金列表
export function listAccount(query) {
  return request({
    url: '/system/account/list',
    method: 'get',
    params: query
  })
}

// 查询用户资金详细
export function getAccount(userId) {
  return request({
    url: '/system/account/' + userId,
    method: 'get'
  })
}

// 新增用户资金
export function addAccount(data) {
  return request({
    url: '/system/account',
    method: 'post',
    data: data
  })
}

// 修改用户资金
export function updateAccount(data) {
  return request({
    url: '/system/account',
    method: 'put',
    data: data
  })
}

export function recharge(data) {
  return request({
    url: '/system/account/recharge',
    method: 'post',
    data: data
  })
}


// 删除用户资金
export function delAccount(userId) {
  return request({
    url: '/system/account/' + userId,
    method: 'delete'
  })
}
